\subsection{Other Issues Regarding Our Implementation}
 
\subsubsection{Inheriting from Object}
As should be known, all Java classes inherit automatically from the
\texttt{Object} class. This provides important properties that we use in our OOP
design. However, some of these properties will only be there if methods
are overriden by implementations in our classes.\\ 

\cite{EffectiveJava} discusses the issues regarding methods common to all
objects. The methods in question, and recommendations by \cite{EffectiveJava},
are as follows:

\begin{itemize}
  \item \texttt{equals()} - if implemented, do it correctly
  \item \texttt{hashCode()} - implement if \texttt{equals()} is implemented
  \item \texttt{toString()} - implement, unless you have good reasons
  not to
  \item \texttt{clone()} - if implemented, do it correctly  
\end{itemize}

\texttt{equals()} and \texttt{hashCode()} were not implemented. We briefly
discussed the possibility of implementing a hash code in the
\texttt{NestedLinkedList} class to be used when inserting into the hashtables.
This was discarded over using the \texttt{String} class \texttt{hashCode()} method (see
section on hash tables \ref{hash_imp} for more information on our hash
function).

The \texttt{toString()} method is overriden only in the model (searcher
classes), view and controller. The information contained are the relevant
settings, e.g. is boolean searching on? (model), what type of view is this?
(view) etc. We have chosen not to implement \texttt{toString()} in other
classes, though it could easily be done.\\

We have overridden the \texttt{clone()} method in our data structures
\texttt{linkedList}, \texttt{URLList} and \texttt{NestedLinkedList}. These data
structures are used extensively in the program and functionality of cloning was relevant in some
cases. Specifically, our problem was Java's pass-by-value of object references,
where we needed a method to make sure nothing outside the data
structure/searcher pair could tamper with data. \\

We have not chosen to implement \texttt{clone()} in our concrete
syntax tree or in our hash tables, though that might be relevant if our code
was to be used other places. It was also deemed not relevant to implement
\texttt{clone()} in MVC-classes, the utility classes or any other classes.\\ 

We deem our choices to be consistent with the scope of the project. For
production-level code, or for a larger-scale academic project, we would consider
implementing further common methods.
